<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>0423</title>
    <script src="js/vue.js"></script>
</head>

<body>
    <div id="app">
        <!-- 使用v-if隐藏整个无序列表 -->
        <ul v-if="flag">
            <!-- 遍历所有元素 -->
            <li v-for="item in items">
                {{item.text}}
            </li>
        </ul>
    </div>
    <script>
        var vm = new Vue({
            el: "#app",
            data: {
                flag: true,
                items: [
                    { text: "vue", isOk: true },
                    { text: "React", isOk: true },
                    { text: "Angular", isOk: true },
                    { text: "html5", isOk: true },
                    { text: "CSS3", isOk: true },
                    { text: "JavaScript", isOk: true }
                ]
            }
        })
    </script>
</body>

</html>